Create Customer Package
Create Customer Package API is used to create a package for use by the customer children (sub-accounts). A package may consist of multiple offers, hence, enables handling (attach, detach) of multiple offers using a single entity.
| Method | Path |
|---|---|
| POST | /api/v2/customer/{id}/package |
Eligibility
The requestor is eligible to create a new package for use by sub-accounts. However, they are not eligible to create new packages for their own use.
API Request
Request Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| name | String | M | Package name. Must be unique. |
| description | String | O | Package description. |
| nestedOffers | UUID | M | Array of offer IDs. At least one offer should be provided. The order of UUIDs in the array dictates offer priority within the package. |
| eligibleSubAccountIds | String | M | Array of sub-account UUIDs. Specified sub-accounts are eligible to view and manage (attach/detach) this package as part of the self-service feature. If sent empty, none of the customer’s sub-accounts are eligible for this package. 'ALL' keyword (ENUM) means all the customer’s sub-accounts are eligible for this package. |
API Response
Response Structure
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| errorCode | String | O | Failure code. |
| errorMessage | String | O | Failure detailed description. |
| content | Object | O | Array of the main response body objects. Displayed when an API call is successful. For a failure, it will be empty. |
| pageable | Object | O | Paging information object. Displayed when an API call is successful. For a failure, it will be empty. |
Content
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| packageId | UUID | M | New package generated universal unique identifier. |
| requestId | UUID | M | Request instance ID. To be used by external systems to query the call (operation) status, whether in progress, successful, or failed. |
Pageable
| Parameter | Type | M/O/CM | Description |
|---|---|---|---|
| page | Numeric | M | Page number. |
| size | Numeric | M | Page size. Number of requested elements per page. |
| totalPages | Numeric | M | Total amount of available pages per requested page size. |
| totalElements | Numeric | M | Total amount of retrieved elements. |
Error Codes
In addition to the general success and failure codes, the following error codes are possible:
| Code | Message |
|---|---|
| GLOBAL_1001 | Service unavailable. Please try again. |
Examples
Request Body
Copy
{
"name": "Basic roaming package",
"description": "Basic roaming package description",
"nestedOffers": [
"cae5ce03-d331-40e1-9a1e-803fcdc905c7",
"ff74dba6-8e7f-4b15-a42b-13810913b371"
],
"eligibleSubAccountIds": [
"ee74dca6-8e7f-4b85-a42b-13860913b3b1",
"ff74aca1-8d1f-4b85-a62a-93360913b370",
"b7ff0c8d-ac91-4b0a-8e72-bbc45ba38dbd"
]
}
Response Body Success ACK
Copy
{
"errorCode": "",
"errorMessage": "",
"content": [
{
"requestId": "dbf2f414-ba35-4e64-a6b9-acf66752e8c0",
"packageId": "ee74dcd7-8e7f-4c45-a42b-13860913b129"
}
],
"pageable": {
"page": 0,
"size": 10,
"totalPages": 1,
"totalElements": 1
}
}
Response Body Failure NACK
Copy
{
"errorCode": "GLOBAL_1001",
"errorMessage": "Service unavailable. Please try again",
"content": "",
"pageable": ""
}